package com.wxy.controller;

import java.util.ArrayList;

import java.util.List;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.alibaba.fastjson.JSON;
import com.wxy.pojo.*;

@Controller
public class StudentController {
	
		@RequestMapping(value = "/list" ,produces = "application/json;charset=utf-8")	
		@ResponseBody
		public  String  login(){	
			
			List<Student> list = new ArrayList<Student>();
			list.add(new Student(1, "张三", "男", "xx大学","xx专业","15622225414"));
			list.add(new Student(1, "李四", "男", "xx大学","xx专业","15622225414"));
			list.add(new Student(1, "王五", "男", "xx大学","xx专业","15622225414"));
		
			String json = JSON.toJSONString(list, true).toString();
			return json;  
	    }
		
	}
